<!--  -->
<template>
  <div class="container">
    <!-- 遮罩层开始 -->
    <div class="mask" v-show="showMore" @click="hideMoreFunc">
      <div class="moreForm" @click.stop="showMoreFunc">
        <p class="formTitle">更多筛选</p>
        <el-form ref="form" :model="form" label-width="80px">
          <el-form-item>
            <el-input v-model="form.num" placeholder="订单编号"></el-input>
          </el-form-item>
          <el-form-item>
            <el-input v-model="form.name" placeholder="商品关键字"></el-input>
          </el-form-item>
          <el-form-item>
            <el-select v-model="form.region" placeholder="请选择支付渠道">
              <el-option value="支付宝支付"></el-option>
              <el-option value="微信支付"></el-option>
              <el-option value="线下打款"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-select v-model="form.refund" placeholder="是否有退款">
              <el-option value="是否有退款"></el-option>
              <el-option value="有退款"></el-option>
              <el-option value="无退款"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-col :span="11">
              <el-date-picker
                type="date"
                placeholder="订单添加开始时间"
                v-model="form.date1"
                style="width: 100%"
              ></el-date-picker>
            </el-col>
            <el-col class="line" :span="2">&nbsp;至</el-col>
            <el-col :span="11">
              <el-date-picker
                type="date"
                placeholder="选择日期"
                v-model="form.date2"
                style="width: 100%"
              ></el-date-picker>
            </el-col>
          </el-form-item>
          <el-form-item>
            <el-button class="clearAllItems">清空</el-button>
            <el-button class="filterItems">筛选</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
    <!-- 遮罩层结束 -->
    <div class="container-content">
      <!-- 退费的版块开始 -->
      <div class="refund-templete" v-if='showPaid'>
        <div class="box1">
          <div class="turnBack">
            <i class="el-icon-back" @click="goBackClick"
              ><span class="back">返回</span></i
            ><i class="line"></i><span class="refundBill">退款订单</span>
          </div>
          <div class="filter-box">
            <div class="payWay">
              <template>
                <el-select v-model="value" placeholder="请选择支付渠道">
                  <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </template>
            </div>
            <el-input
              class="input"
              v-model="tel"
              placeholder="请输入手机号"
            ></el-input>
            <el-input
              class="input"
              v-model="refundBill"
              placeholder="请输入退款单号"
            ></el-input>
            <template>
              <el-select v-model="value" placeholder="退款类型">
                <el-option
                  v-for="item in options2"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </template>
            <template>
              <el-select v-model="value" placeholder="退款状态">
                <el-option
                  v-for="item in options3"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </template>
            <button class="clearAll">清空</button>
            <button class="filter">筛选</button>
            <div class="more" @click="showMoreFunc">
              <img src="@/assets/img/icon-filter.png" alt="" />更多
            </div>
          </div>
        </div>
        <div class="box2">
          <!-- tab选项卡开始 -->
          <template>
            <el-tabs v-model="activeName" @tab-click="handleClick">
              <el-tab-pane label="全部（2544）">
                <div class="tree-date">
                  <el-table
                    :data="tableData"
                    style="width: 100%; margin-bottom: 20px"
                    row-key="id"
                    border
                    default-expand-all
                    :tree-props="{
                      children: 'children',
                      hasChildren: 'hasChildren',
                    }"
                  >
                    <el-table-column
                      prop="id_txt"
                      label="ID"
                      sortable
                      width="180"
                    >
                    </el-table-column>
                    <el-table-column prop="user_txt" label="学员">
                    </el-table-column>
                    <el-table-column prop="goods_txt" label="商品名称">
                    </el-table-column>
                    <el-table-column
                      prop="money_txt"
                      label="支付金额"
                      sortable
                      width="180"
                    >
                    </el-table-column>
                    <el-table-column prop="payWay_txt" label="支付渠道">
                    </el-table-column>
                    <el-table-column prop="payStatus_txt" label="支付状态">
                    </el-table-column>
                    <el-table-column prop="refund_txt" label="退款">
                    </el-table-column>
                    <el-table-column
                      prop="billCreate_txt"
                      label="订单创建时间"
                      sortable
                      width="180"
                    >
                    </el-table-column>
                    <el-table-column prop="do" label="操作"> </el-table-column>
                  </el-table>
                </div>
              </el-tab-pane>
              <el-tab-pane label="已支付（96）"></el-tab-pane>
              <el-tab-pane label="支付中（512）"></el-tab-pane>
              <el-tab-pane label="未支付（1936）"></el-tab-pane>
              <el-tab-pane label="已取消（0）"></el-tab-pane>
            </el-tabs>
          </template>
          <!-- tab选项卡结束 -->
          <!-- 分页开始 -->
          <div class="block">
            <span class="demonstration">完整功能</span>
            <el-pagination
              :current-page="currentPage4"
              :page-sizes="[100, 200, 300, 400]"
              :page-size="100"
              layout="total, sizes, prev, pager, next, jumper"
              :total="400"
            >
            </el-pagination>
          </div>
          <!-- 分页结束 -->
        </div>
      </div>
      <!-- 退费的版块结束 -->
      <!-- 付费的版块开始 -->
      <div class="paid-templete" v-else>
        <div class="box1">
          <div class="refund" @click='toRefundTemplete'>退款订单</div>
          <div class="filter-box">
            <el-input
              class="input"
              v-model="inputNum"
              placeholder="订单编号"
            ></el-input>
            <el-input
              class="input"
              v-model="inputGoods"
              placeholder="商品关键字"
            ></el-input>
            <div class="payWay">
              <template>
                <el-select v-model="value" placeholder="请选择">
                  <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </template>
            </div>
            <button class="clearAll">清空</button>
            <button class="filter">筛选</button>
            <div class="more" @click="showMoreFunc">
              <img src="@/assets/img/icon-filter.png" alt="" />更多
            </div>
          </div>
        </div>
        <div class="box2">
          <!-- tab选项卡开始 -->
          <template>
            <el-tabs v-model="activeName" @tab-click="handleClick">
              <el-tab-pane label="全部（2544）">
                <div class="tree-date">
                  <el-table
                    :data="tableData"
                    style="width: 100%; margin-bottom: 20px"
                    row-key="id"
                    border
                    default-expand-all
                    :tree-props="{
                      children: 'children',
                      hasChildren: 'hasChildren',
                    }"
                  >
                    <el-table-column
                      prop="id_txt"
                      label="ID"
                      sortable
                      width="180"
                    >
                    </el-table-column>
                    <el-table-column prop="user_txt" label="学员">
                    </el-table-column>
                    <el-table-column prop="goods_txt" label="商品名称">
                    </el-table-column>
                    <el-table-column
                      prop="money_txt"
                      label="支付金额"
                      sortable
                      width="180"
                    >
                    </el-table-column>
                    <el-table-column prop="payWay_txt" label="支付渠道">
                    </el-table-column>
                    <el-table-column prop="payStatus_txt" label="支付状态">
                    </el-table-column>
                    <el-table-column prop="refund_txt" label="退款">
                    </el-table-column>
                    <el-table-column
                      prop="billCreate_txt"
                      label="订单创建时间"
                      sortable
                      width="180"
                    >
                    </el-table-column>
                    <el-table-column prop="do" label="操作"> </el-table-column>
                  </el-table>
                </div>
              </el-tab-pane>
              <el-tab-pane label="已支付（96）"></el-tab-pane>
              <el-tab-pane label="支付中（512）"></el-tab-pane>
              <el-tab-pane label="未支付（1936）"></el-tab-pane>
              <el-tab-pane label="已取消（0）"></el-tab-pane>
            </el-tabs>
          </template>
          <!-- tab选项卡结束 -->
          <!-- 分页开始 -->
          <div class="block">
            <span class="demonstration">完整功能</span>
            <el-pagination
              :current-page="currentPage4"
              :page-sizes="[100, 200, 300, 400]"
              :page-size="100"
              layout="total, sizes, prev, pager, next, jumper"
              :total="400"
            >
            </el-pagination>
          </div>
          <!-- 分页结束 -->
        </div>
      </div>
      <!-- 付费的版块结束 -->
      
    </div>
  </div>
</template>
      </div>
    </div>
  </div>
</template>

<script>
// 这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
// 例如：import 《组件名称》 from '《组件路径》';

export default {
  // import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // 这里存放数据
    return {
      options: [
        {
          value: "选项1",
          label: "支付宝支付",
        },
        {
          value: "选项2",
          label: "微信支付",
        },
        {
          value: "选项3",
          label: "线下打款",
        },
      ],
      options2: [
        {
          value: "选项1",
          label: "类款类型",
        },
        {
          value: "选项2",
          label: "原渠道退回",
        },
        {
          value: "选项3",
          label: "线下退款（线上记录）",
        },
      ],
      options3: [
        {
          value: "选项1",
          label: "退款状态",
        },
        {
          value: "选项2",
          label: "待处理",
        },
        {
          value: "选项3",
          label: "退款成功",
        },
        {
          value: "选项4",
          label: "退款异常",
        },
        {
          value: "选项5",
          label: "退款已关闭",
        },
      ],
      inputNum: "",
      inputGoods: "",
      value: "",
      form: {
        num: "",
        name: "",
        region: "",
        refund: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
      },
      activeName: "second",
      showMore: false,
      tableData: [
        {
          id: 1,
          id_txt: 2544,
          user_txt: "hello",
          goods_txt: "季度会员",
          money_txt: "￥249",
          payWay_txt: "微信支付",
          payStatus_txt: "已支付",
          refund_txt: "￥10.00",
          billCreate: "2022-08-11 11:24",
          do: " 查看更多",
        },
      ],
      showPaid:false,
    };
  },
  // 监听属性 类似于data概念
  computed: {},
  // 监控data中的数据变化
  watch: {},
  // 方法集合
  methods: {
    handleClick: function () {},
    showMoreFunc: function () {
      this.showMore = true;
    },
    hideMoreFunc: function () {
      this.showMore = false;
    },
    toRefundTemplete:function(){
      this.showPaid=true;
    },
    goBackClick:function(){
      this.showPaid=false;
    }
  },
  // 生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  // 生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
  beforeCreate() {}, // 生命周期 - 创建之前
  beforeMount() {}, // 生命周期 - 挂载之前
  beforeUpdate() {}, // 生命周期 - 更新之前
  updated() {}, // 生命周期 - 更新之后
  beforeDestroy() {}, // 生命周期 - 销毁之前
  destroyed() {}, // 生命周期 - 销毁完成
  activated() {}, // 如果页面有keep-alive缓存功能，这个函数会触发
};
</script>
<style lang='less'  scoped>
// input-placeholder {
//   color: red !important;
// }
.container {
  width: 100%;
  height: auto;
  background-color: #fff;
  box-sizing: border-box;
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 90px;
  box-shadow: 0 2px 4px 0 hsl(0deg 0% 40% / 5%);
  min-width: 1180px;
  position: relative;
  // 遮罩层开始

  .mask {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    .moreForm {
      width: 352px;
      height: 100%;
      background-color: #fff;
      position: absolute;
      right: 0;
      padding: 30px;
      p {
        height: 16px;
        font-size: 16px;
        font-weight: 400;
        color: #333;
        margin-bottom: 30px;
      }
      .el-form {
        width: 100%;
        height: auto;
        .el-form-item {
          /deep/.el-form-item__content {
            margin-left: 0px !important;
            .el-input {
              text-align: left;
            }
            .el-select {
              width: 292px;
            }
            .clearAllItems {
              margin: 20px 0 0 0;
            }
            .filterItems {
              margin-left: 150px;
              background-color: #409eff;
              color: #fff;
              &:hover {
                background-color: #66b1ff;
              }
            }
          }
        }
      }
    }
  }
  // 遮罩层结束
  .container-content {
    .paid-templete {
      .box1 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 30px;
        .refund {
          color: #fff;
          background-color: #409eff;
          border-color: #409eff;
          padding: 10px 20px;
          font-size: 14px;
          border-radius: 4px;
          cursor: pointer;
          &:hover {
            background-color: #66b1ff;
          }
        }

        .filter-box {
          display: flex;
          .input {
            width: 150px;
            height: 40px;
            font-size: 14px;
            border-radius: 4px;
            box-sizing: border-box;
            color: #606266;
            margin-right: 10px;
          }

          .payWay {
            width: 150px;
            margin-right: 10px;
          }

          button.clearAll {
            font-weight: 400;
            cursor: pointer;
            box-sizing: border-box;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 14px;
            background-color: #fff;
            padding: 7px 20px;
            color: #212121;
            margin-right: 10px;
            &:hover {
              background-color: #ecf5ff;
              color: #409eff;
            }
          }

          button.filter {
            font-weight: 400;
            cursor: pointer;
            box-sizing: border-box;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 14px;
            background-color: #409eff;
            padding: 7px 20px;
            color: #fff;
            margin-right: 10px;
            border: 0;
            &:hover {
              background-color: #66b1ff;
            }
          }

          .more {
            height: 14px;
            font-size: 14px;
            font-weight: 400;
            color: #666;
            line-height: 14px;
            cursor: pointer;
            margin-top: 14px;
            line-height: 14px;

            img {
              width: 14px;
              height: 14px;
              vertical-align: top;
            }
          }
        }
      }
    }
    .refund-templete {
      .box1 {
        .turnBack {
          font-size: 14px;
          margin-bottom: 30px;
          
          .el-icon-back {
            color: #333;
            cursor: pointer;
          }

          .line {
            display: inline-block;
            width: 1px;
            height: 14px;
            background-color: #d8d8d8;
            margin-right: 15px;
            margin-left: 15px;
          }

          .refundBill {
            font-weight: 600;
          }
        }

        .filter-box {
          display: flex;
          justify-content: end;
          .input {
            width: 150px;
            height: 40px;
            font-size: 14px;
            border-radius: 4px;
            box-sizing: border-box;
            color: #606266;
            margin-right: 10px;
          }
          /deep/.el-input__inner {
            width: 150px;
            height: 40px;
            margin-right: 10px;
          }
          /deep/.el-input__icon {
            margin-right: 10px;
          }

          .payWay {
            width: 150px;
            margin-right: 10px;
          }

          button.clearAll {
            font-weight: 400;
            cursor: pointer;
            box-sizing: border-box;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 14px;
            background-color: #fff;
            padding: 7px 20px;
            color: #212121;
            margin-right: 10px;
            &:hover {
              background-color: #66b1ff;
            }
          }

          button.filter {
            font-weight: 400;
            cursor: pointer;
            box-sizing: border-box;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 14px;
            background-color: #409eff;
            padding: 7px 20px;
            color: #fff;
            margin-right: 10px;
            border: 0;
            &:hover {
              background-color: #66b1ff;
            }
          }

          .more {
            height: 14px;
            font-size: 14px;
            font-weight: 400;
            color: #666;
            line-height: 14px;
            cursor: pointer;
            margin-top: 14px;
            line-height: 14px;
            img {
              width: 14px;
              height: 14px;
              vertical-align: top;
            }
          }
        }
      }

      .box2 {
        .block {
          span.demonstration {
          }

          el-pagination {
          }
        }
      }
    }
  }
}
</style>
